home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / pcbwho.zip / PCBWHO.PAS < prev    next >
Pascal/Delphi Source File  |  1991-12-23  |  3KB  |  78 lines

  1. program PCB_Who;
  2. {$M $4000,0,0}
  3. uses dos, crt;
  4. {
  5.    Program.......: PCB_Who
  6.    Author........: Elmer O. Laudenslager, III
  7.    Date..........: December 22, 1991
  8.    What & Why....: This program was written to extract the name of the
  9.                    person in the PCBoard.SYS file.  Then, send a message
  10.                    to person designated to receive messages.  I wrote this
  11.                    program to send me the name of people who log in to my
  12.                    bbs.  This program gets called in the $$LOGON.BAT file
  13.                    for PCBoard 14.5A.  The layout of the PCBWHO.CNF file
  14.                    is as follows:
  15.  
  16. Line 1             C:\LAN\NET.EXE          < == Name and Location of the
  17.                                                 NET.EXE file for Artisoft's
  18.                                                 Lantastic
  19. Line 2             C:\PCB9\PCBOARD.SYS     < == Name and Location to the
  20.                                                 PCBOARD.SYS file
  21. Line 3             elmer                   < == Name of person to receive
  22.                                                 the message
  23.  
  24.                    If you find this program useful, you can reach me at
  25.                                  Elmer O. Laudenslager, III
  26.                                  406 High Street # 6
  27.                                  Williamsport, Pa 17701
  28.  
  29. I, Elmer O. Laudenslager, III herebye donate this code to the public domain.
  30. This .ZIP file is Authenticated and Verified.  If it is tampered with, you'll
  31. be informed by the PKUNZIP program.  I ask for no donations.  I thought this
  32. program would be useful.  I am sure that there are other uses that It could
  33. be put to.
  34.  
  35. My BBS is : The New! VVBBS
  36.             (717) 323 - 1645  Data 1
  37.             (717) 323 - 6235  Data 2
  38.             (717) 323 - 4365  Voice
  39.  
  40. }
  41. var
  42.   cf       : text;                     {control data file}
  43.   net_loc  : string;                   {full path to net.exe}
  44.   net_snd  : string;                   {person to receive message}
  45.   pcb_sys  : string;                   {full path to pcboard.sys}
  46.   f        : file of char;
  47.   t        : string;
  48.   s        : string[25];
  49.   c        : array[1..25] of char;
  50.   i        : integer;
  51.   b        : char;
  52.  
  53. begin
  54.    Assign(cf,'pcbwho.cnf');            {open configuration file}
  55.    Reset(cf);
  56.    Readln(cf,net_loc);                 {read the location and name of the}
  57.    Readln(cf,pcb_sys);                 {net.exe file. read name of users to}
  58.    Readln(cf,net_snd);                 {receive the message.  read location}
  59.    Close(cf);                          {and name of pcboard.sys file.  Close}
  60.    Assign(f,pcb_sys);                  {Open the PCBoard.sys file}
  61.    Reset(f);
  62.    for i := 1 to 84 do                 {Bypass the first 84 bytes.}
  63.       Read(f,b);
  64.    for i := 1 to 25 do                 {Read name of person logging in.}
  65.       begin                            {25 bytes.}
  66.          read(f,b);
  67.          c[i] := b;
  68.       end;
  69.    s := '';
  70.    for i := 1 to 25 do                 {move name to a string}
  71.       s := s + c[i];
  72.    Close(f);
  73.    t := ' SEND * "' + s + ' has logged into the BBS." * ' + net_snd;
  74.    SwapVectors;
  75.    Exec(net_loc,t);                    {call the net send program}
  76.    SwapVectors;
  77. end.                                   {bye - bye}
  78.